package com.example.springboot_demo.pojo;


import java.io.Serializable;

//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//使用 lombok简化开发，@data代替set，get和toString方法
// @AllArgsConstructor代替有参构造方法 @NoArgsConstructor代替无参构造方法
public class CartData<T> implements Serializable {
    //图书的id
    private Integer id;
    //图书的名字
    private String name;

    //图书的数量
    private Integer bookCnt;

    //图书的单价
    private double book_UnitPrice;

    //总价
    private double book_allPrice;


    public CartData() {
    }

    public CartData(Integer id, String name, Integer bookCnt, double book_UnitPrice, double book_allPrice) {
        this.id = id;
        this.name = name;
        this.bookCnt = bookCnt;
        this.book_UnitPrice = book_UnitPrice;
        this.book_allPrice = book_allPrice;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getBookCnt() {
        return bookCnt;
    }

    public void setBookCnt(Integer bookCnt) {
        this.bookCnt = bookCnt;
    }

    public double getBook_UnitPrice() {
        return book_UnitPrice;
    }

    public void setBook_UnitPrice(double book_UnitPrice) {
        this.book_UnitPrice = book_UnitPrice;
    }

    public double getBook_allPrice() {
        return book_allPrice;
    }

    public void setBook_allPrice(double book_allPrice) {
        this.book_allPrice = book_allPrice;
    }
}

